<?
$sql = "select * from tb_news where id = '$_GET[id]'";
$qr = select($sql);
$rs = $qr[0];
delete("tb_news","id='$rs[id]'");

if(file_exists("../upload/news/$rs[image]")){
	unlink("../upload/news/$rs[image]");
	unlink("../upload/news/thumb/$rs[image]");
}

?>
<SCRIPT LANGUAGE="JavaScript">alert("delete content suscessfully");window.history.back();</script>	